import request from "@/utils/request";

/**
 * 新增学生奖罚记录
 * @param studentId
 * @param time
 * @param description
 * @param type
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function addInfo(studentId,time,description,type){
    const data = {
        studentId:studentId,
        time:time,
        description:description,
        type:type
    }
    return request.post('/reward_punish/add',data);
}

/**
 * 获取id对应的所有学生 （id可以从后端获取判断）
 * @returns {Promise<axios.AxiosResponse<any>>}
 */
export function getAll(){
    return request.get('/reward_punish/all')
}
